home *** CD-ROM | disk | FTP | other *** search
/ Borland JBuilder 6 / jbuilder6.iso / IBM VisualAge for Java Enterprise v4.0 Retail / ivj40 / setup / IDE.Cab / F77367_VAJavaStatusLabelUI.class (.txt) < prev    next >
Encoding:
Java Class File  |  2000-04-25  |  1.2 KB  |  38 lines

  1. package com.ibm.ivb.jface.vajava;
  2.  
  3. import com.ibm.ivb.jface.parts.StatusLabel;
  4. import com.ibm.ivb.jface.plaf.StatusLabelUI;
  5. import javax.swing.JComponent;
  6. import javax.swing.border.Border;
  7. import javax.swing.border.EmptyBorder;
  8. import javax.swing.plaf.ComponentUI;
  9.  
  10. public class VAJavaStatusLabelUI extends StatusLabelUI {
  11.    private static final String kCBIBMCopyright = "(c) Copyright IBM Corporation 1998";
  12.    protected static VAJavaStatusLabelUI labelUI;
  13.    protected static Border border;
  14.  
  15.    public static ComponentUI createUI(JComponent var0) {
  16.       if (labelUI == null) {
  17.          labelUI = new VAJavaStatusLabelUI();
  18.          border = new EmptyBorder(0, 5, 0, 5);
  19.       }
  20.  
  21.       return labelUI;
  22.    }
  23.  
  24.    public void installUI(JComponent var1) {
  25.       super.installUI(var1);
  26.       StatusLabel var2 = (StatusLabel)var1;
  27.       ((JComponent)var2).setBorder(border);
  28.    }
  29.  
  30.    public void uninstallUI(JComponent var1) {
  31.       super.uninstallUI(var1);
  32.       if (var1.getBorder() == border) {
  33.          var1.setBorder((Border)null);
  34.       }
  35.  
  36.    }
  37. }
  38.